<template>
  <div id="app">
    <router-view></router-view>
  </div>
</template>

<script>
export default {
  async created () {
    const ret = await this.$http.get("/user/info");
    console.log("ret", ret);
    if (ret.code === 0) {
      this.$store.dispatch("user/login", ret.data);
    }
  }
};
</script>

<style lang="scss" scoped>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  display: flex;
  flex-direction: column;
}
</style>
